package org.example.mybatis.plus.boot3.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.util.Date;

@Data
@TableName("User")
public class User {
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    private String name;

    @TableField("update_time")
    private Date updateTime;

    /**
     * 乐观锁版本字段
     * 必须要有 @Version 注解
     */
    @Version
    private Integer version;

    /**
     * 租户ID字段
     */
    @TableField("tenant_id")
    private Long tenantId;
}
